home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / lblcs.arc / CRT_SCRO.ASM < prev    next >
Assembly Source File  |  1985-04-04  |  2KB  |  117 lines

  1. ;--------------------------------------------------------------------------
  2. ;
  3. ; name        crt_scrolld -- scroll screen down
  4. ;
  5. ; synopsis    VOID    crt_scrolld(ulrow,ulcol,lrrow,lrcol,count,attrib)
  6. ;
  7. ;        int    ulrow;        upper left row
  8. ;        int    ulcol;        upper left column
  9. ;        int    lrrow;        lower right row
  10. ;        int    lrcol;        lower right column
  11. ;        int    count;        # lines to scroll ( 0=whole window )
  12. ;        int    attrib;        attribute used on blank lines
  13. ;
  14. ; description    scrolls the window specified by "ulcol", "ulrow",
  15. ;        "lrcol", "lrrow" down by "count" lines using "attrib"
  16. ;        on each blank line.  If "count" is 0, the entire
  17. ;        screen is scrolled.
  18. ;
  19. ;----------------------------------------------------------    
  20.  
  21.  
  22. ;----------------------------------------------------------
  23. ;
  24. ; name        crt_scrollu -- scroll screen up
  25. ;
  26. ; synopsis    VOID    crt_scrollu(ulrow,ulcol,lrrow,lrcol,count,attrib)
  27. ;        int    ulrow;        upper left row
  28. ;        int    ulcol;        upper left column
  29. ;        int    lrrow;        lower right row
  30. ;        int    lrcol;        lower right column
  31. ;        int    count;        # lines to scroll ( 0=whole window )
  32. ;        int    attrib;        attribute used on blank lines
  33. ;
  34. ; description    scrolls the window specified by "ulcol", "ulrow",
  35. ;        "lrcol", "lrrow" up by "count" lines using "attrib"
  36. ;        on each blank line.  If "count" is 0, the entire
  37. ;        screen is scrolled.
  38. ;
  39. ;----------------------------------------------------------    
  40.  
  41.     include    dos.mac
  42.  
  43. video    equ    10h        ; video interrupt number
  44.  
  45.  
  46.     IF    LPROG
  47. X    EQU    6        ;OFFSET OF ARGUMENTS
  48.     ELSE
  49. X    EQU    4        ;OFFSET OF ARGUMENTS
  50.     ENDIF
  51.  
  52.     PSEG
  53.  
  54.  
  55.  
  56.     PUBLIC    crt_scrolld
  57.  
  58.     IF    LPROG
  59. crt_scrolld    PROC    FAR
  60.     ELSE
  61. crt_scrolld    PROC    NEAR
  62.     ENDIF
  63.  
  64.  
  65.     PUSH    BP            ;SAVE BP
  66.     call    scrl1
  67.     mov    ah,7
  68.     int    video
  69.     POP    BP
  70.     RET
  71.  
  72. crt_scrolld    ENDP
  73.  
  74. ;-------------------
  75. ; internal routine
  76. ;-------------------
  77.  
  78. scrl1    proc    near
  79.  
  80.     mov    bp,sp
  81.     mov    ch,[bp+x+2]    ; ulrow
  82.     mov    cl,[bp+x+2+2]    ; ulcol
  83.     mov    dh,[bp+x+2+4]    ; lrrow
  84.     mov    dl,[bp+x+2+6]    ; lrcol
  85.     mov    al,[bp+x+2+8]    ; count
  86.     mov    bh,[bp+x+2+10]    ; attrib
  87.     ret
  88.  
  89. scrl1    endp
  90.  
  91. ;-------------------------
  92. ; end of internal routine
  93. ;-------------------------
  94.  
  95.     PUBLIC    crt_scrollu
  96.  
  97.     IF    LPROG
  98. crt_scrollu    PROC    FAR
  99.     ELSE
  100. crt_scrollu    PROC    NEAR
  101.     ENDIF
  102.  
  103.  
  104.     PUSH    BP            ;SAVE BP
  105.     call    scrl1
  106.     mov    ah,6            ; scroll up function
  107.     int    video
  108.     POP    BP
  109.     RET
  110.  
  111. crt_scrollu    ENDP
  112.  
  113.  
  114.     endps
  115.     end
  116.  
  117.